
import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/',
            redirect: '/home'
        },
        {
            path: '/index',
            name: 'index',
            component: () => import('@/views/Login.vue'),
        },

        {
            path: '/home',
            name: 'home',
            component: () => import('@/views/Home.vue'),
            children:[
                {
                    name:'home_redirect',
                    path: '',
                    component:() => import('@/components/home/Home.vue'),
                },
                {
                    name:'chat',
                    path: 'chat',
                    component:() => import('@/components/home/Chat.vue'),
                },
                {   
                    name:'ai_app',
                    path:'ai_app', 
                    component:() => import('@/components/home/AIApp.vue'),
                },
                {   
                    name:'rag_chat',
                    path:'rag_chat', 
                    component:() => import('@/components/home/RAGChat.vue'),
                },
                {   
                    name:'userinfo',
                    path:'userinfo', 
                    component:() => import('@/components/home/UserInfo.vue'),
                },
                
            ]
        },


    ],
})

export default router